package com.example.homewrok.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import lombok.*;

@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
//注意这里entity实体类注解必须加
@Entity
public class Students {
    //还有这的ID也是
    @Id
    private int userid;
    private String studentname;
    private String sex;
    private int age;
    private String classname;

    public Students(String studentname, String sex, Integer age, String classname) {
        this.studentname = studentname;
        this.sex = sex;
        this.age = age;
        this.classname = classname;
    }
}
